import { lazy } from "react";

import { createBrowserRouter } from "react-router-dom";
import App from "../App";

let Home = lazy(() => import("../pages/home/Index"));
let Index = lazy(() => import("../pages/index/Index"));
let Login = lazy(() => import("../pages/login/Index"));

const routes = [
  {
    path: "/",
    element: <App></App>,
    children: [
      {
        path: "/home",
        element: <Home></Home>,
      },
    ],
  },
  {
    path: "/index",
    element: <Index></Index>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
];
let router = createBrowserRouter(routes);
export default router;
